<?php
	include(ROOTPATH .'include'. DS .'protect.php');
	include_once(ROOTPATH .'include'. DS .'conn.php');
	include_once(ROOTPATH .'class'. DS .'global.php');
	include_once(ROOTPATH .'pageEvent'. DS .'comments.php');
?>
<script type="text/javascript">
var commentType = '<?php echo $commentType;?>';
</script>
<script type="text/javascript" src="<?php echo JS_PATH;?>comments.js"></script>
<?php /*?><script type="text/javascript" src="<?php echo JSLAB_PATH;?>FCK_Editor/fckeditor.js"></script>
<script type="text/javascript" src="<?php echo JSLAB_PATH;?>FCK_Editor/Set.js"></script> <?php */?>
<?php echo loadEdit('#msg','comment') ;?>
  
        <div id="talk" class="talk">                       
            <div id="say" class="say">
            	<h2><?php echo lang_express_your_opinion;?>：</h2>
                
                <form action="<?php echo WEB_ROOT_PATH;?>?option=commentsAction&type=action&do=add" method="post" name="comments" id="commentsForm" class="commentsForm form">
                <!--<li>姓名:<input type="text" id="userName" name="userName" value="<?php echo $userName;?>" /></li>-->
                <div class="userInfo">
                	<span class="beautyImg">
					<?php if(isset($user)){
					?>
                    <img src="<?php echo getFace($user -> id()); ?>" /><?php }else{?><img src="<?php echo USERFACE ; ?>" /><?php } ?></span>
                </div>
                <ul>
                    <li><textarea name="msg" id="msg" cols="" rows=""></textarea><?php /*?><div class="tips"><?php echo lang_you_can_also_enter;?> <span id="msgNum" class="limitLen"></span> <?php echo lang_characters;?></div><?php */?></li>
                    <li><span class="beauty"><input type="submit" value="<?php echo lang_submit ;?>" class="submit" /></span>
                    <input type="hidden" value="<?php echo $idCode;?>" id="comment_id" name="comment_id" />
                    <?php if( $task_id_code ){?>
                    <input type="hidden" value="<?php echo $task_id_code;?>" id="task_id" name="task_id" />
                    <?php }					
					if( $user_name_code ){?>
                    <input type="hidden" value="<?php echo $user_name_code;?>" id="user_name" name="user_name" />
                    <?php }?>
                    </li>
                </ul>
                <li class="info"></li>
                </form>
            </div>
            <hr />
            <div class="list commentlist">
			<?php
                $comment = new comment();
				//判断 任务。。。
				
				echo $comment -> getList($id, $user_name , $task_id );
            ?>
            </div>
            
        </div><!-- #talk--> 
